package courselection;

public class Course extends People{
    private int id;  // 编号
    private String name;    // 课程名称
    private String place;  // 上课地点
    private String time;    // 时间

    // 空构造
    public Course() {
    }

    // 课程（编号、课程名称、上课地点、时间）
    public Course(int id, String name, String place, String time) {
        this.id = id;
        this.name = name;
        this.place = place;
        this.time = time;
    }

    // 打印课程信息
    public String toString() {
        return "编号：" + id + "，课程名称：" + name + "，上课地点：" + place + "，时间：" + time;
    }

    // 下面是get、set方法
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

}